<html>
<head><meta charset="utf-8"><title>Looking to solve #78654 · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Looking.20to.20solve.20.2378654.html">Looking to solve #78654</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215593294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Looking%20to%20solve%20%2378654/near/215593294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Looking.20to.20solve.20.2378654.html#215593294">(Nov 04 2020 at 15:09)</a>:</h4>
<p>Hello, I'm looking to solve <a href="https://github.com/rust-lang/rust/issues/78654">#78654</a>. I see <span class="user-mention" data-user-id="116009">@nikomatsakis</span> has tagged it <code>E-mentor</code>. I can confirm that returning <code>None</code> solves it, but it gives a very obscure error message:</p>
<div class="codehilite"><pre><span></span><code>error[E0412]: cannot find type `Foo` in this scope
  --&gt; /home/habbasi/git/rust/src/test/ui/async-await/issues/issue-78654.rs:3:24
   |
LL | impl&lt;const H: feature&gt; Foo {
   |                        ^^^ not found in this scope

error[E0573]: expected type, found built-in attribute `feature`
  --&gt; /home/habbasi/git/rust/src/test/ui/async-await/issues/issue-78654.rs:3:15
   |
LL | impl&lt;const H: feature&gt; Foo {
   |               ^^^^^^^ not a type

error[E0658]: const generics are unstable
  --&gt; /home/habbasi/git/rust/src/test/ui/async-await/issues/issue-78654.rs:3:12
   |
LL | impl&lt;const H: feature&gt; Foo {
   |            ^
   |
   = note: see issue #74878 &lt;https://github.com/rust-lang/rust/issues/74878&gt; for more information
   = help: add `#![feature(min_const_generics)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `issue_78654`
  --&gt; /home/habbasi/git/rust/src/test/ui/async-await/issues/issue-78654.rs:3:1
   |
LL | / impl&lt;const H: feature&gt; Foo {
LL | |     async fn biz() {}
LL | | }
   | |_^ consider adding a `main` function to `/home/habbasi/git/rust/src/test/ui/async-await/issues/issue-78654.rs`

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0412, E0573, E0601, E0658.
For more information about an error, try `rustc --explain E0412`.
</code></pre></div>
<p>I was wondering if returning a variant of <code>Some(err)</code> would fix it, but I don't know how to convert a <code>DelaySpanBugEmitted</code> into a <code>TyS</code>.</p>



<a name="215602278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Looking%20to%20solve%20%2378654/near/215602278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Looking.20to.20solve.20.2378654.html#215602278">(Nov 04 2020 at 16:05)</a>:</h4>
<p>I've managed to make the error more reasonable, a PR is in <a href="https://github.com/rust-lang/rust/issues/78739">#78739</a>.</p>



<a name="215616774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Looking%20to%20solve%20%2378654/near/215616774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Looking.20to.20solve.20.2378654.html#215616774">(Nov 04 2020 at 17:44)</a>:</h4>
<p>Approved! Thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>